add template support

Signed-off-by: Roger Manich <roger.manich@gmail.com>