implemented bilinear interpolation