moved hardcoded maxtime to a saner place