first couple of ruby lines I tried