added proper selection of bezier curves.