optimizie heuristic approach
templates, subclass Application