adding processing code