Updated to use raw data as well.