simplify the Boolean logic of the read-to-merge codes

simplify the Boolean logic of the read-to-merge codes