simplified code for templates overriding