added interpolation of negative numbers