bug fix and new makefile