fixing further API for templates