A Taylor-type numerical method for solving nonlinear ordinary differential equations