Improved `process` function signature