changed interpolation function from linear to step