Restored sleeping times and indented the code