add a test for merge_previous