work with template