My first attempt at Ruby. Please feel free to change it.