clean up and use new script for merge