changed to template