pthread working, makefile updated