transferred map.erb to templates