some Ruby code I'm learning