Working solution to the Pig Latin challenge