readded Bezier Curve calculation code