updated with template
should work