rewrite merge so it works, ugh