added minimal template functionality