making the pattern head/foot into real mustache vars