move sleep into shell script
fixes for sleep