Work with template