adding time sleep for threads