moved template engine entrance to own class