initial linear interpolation implementation