fixed missing variable references in the process() function