refactor to make 'raw_data' property available everywhere