midstream processing