added code templateMachine =)