input is now represented by MGTemplateRepresentation instead of NSString