removed sleep from code