raw data logic