finished the first working implementation of interpolation