fix bug in loop in last check in.  merge still doesnt work but sorting does