Comment for variable MAX was saying minimum time value instead of maximum