refactor with curveNet