added trilinear interpolation + algo