add factory to format frequency data, returns to controller which flows through to frequency chart