Implementing a custom interpolator