Changet process() return type and aligned the code, fixed #4