initial processing code