some test code and fix to makefile