making template work all nice