added sample mapping function using interpolation