refactoring - the "ruby" way