add timer and modified Makefile