template_loader as a class