updated sleep command to use timeout