[+] added templates handling