added debugging, fixed Makefile