fix utility for linear interpolation