completed ruby examples 31-40