Updated sleep for js and py