adding process function