implements interp1