Added function statefulProcessor.