sloppy solution for templates