converting to templates