tiny change to factorial method to make it more ruby-like.