updated sleep script, debug still on