spell out distribution_functions and be clearer about what it holds
converting frequency objects to arrays in order to remove all but one occurrence of Object.keys