update implementation of process()