A new method for finding exact traveling wave solutions to nonlinear partial differential equations