added checking threshold for last minute
added checking threshold for any record