the code now conforms to the ruby style guide

Please review.