A generalized method for the design of optimum rocket nozzles