Rewrote your challenge 1 in reasonable ruby formatting.