added bezier curve wrapping