prepare for thread, edit Makefile