Data processing code for MANOS