time comparison was mixed up