adding support for cubic interpolation