refactored featureGroupToInput