work with templates