[MGFFT-81] refactor out common code.