added a Makefile, fixed a problem with the new method