bare-bones linear interpolation function