data processing code