segfault in merge routine, compile with -g
oops, heres the actual merge routine