added calc to check for max time onscreen