Modified fit_rvr to work with multidemensional data