merge online and offline data