supports raw data and frequency data