ruby solution complete