limit algorithm run time to 30 seconds on each template, and 1 minute total