split the work so that we can start to work on combining NonlinearProgram