trying with templates