end of day merging