now using encode to make templates into strings for realz this time