slow but functional hermite interpolation function