added fraction support to mergeAmount