template rendering correctly