fixed interp so that last row does not have undefined values