Added a factorial method and shortest word method