added cicle and improved sleep timer