add Template functions (by ShestakUI)