Text this: Nonlinear programming approach for optimal control problems