code revision for interpolation