remvoe thread delay and compile it with -O2