removed a section of code and now the template works