implement proper template cascading with parents() and templates()