Using blocks and other misc code part of ruby