add bezier curve
update algorithm