added a random time sleep