removed maxTime
added logging