added time check