fixed some stuff, added integer time criteria