optimized "weighted interpolation function"