change the use of process function