first version of mergeAndQc.py