finalproject data processing code