ruby: working through