finish up of methods blocks and sorting in ruby