Nearly done with the 'process' function