Creating template as goal for document