add delay function and into Makefile