Added return value to the process function