change main.c to make a lua sleep routine possible