Timing is implemented. Changed repeat at for sleeping. more intuitive.