Added sleep to reset functionality