refactored init_curves.