First bezier implementation