removed sleep function