in-class code from December 2-3 Ruby class