Time check is written. Needs to be fully tested.