repair makefile and add sort tests