update 11/23/14

fixed bugs in merge function