better makefile and tests