further work on merging