wrap processor into function