ruby example for second question