calling undefined function from template