implementation of simple templates