major update to merge.py