Move interpolation to separate function
- prepare for different algorithms
- prepare for possible config switch of interpolation type