added flat bezier interpolation