checking / tidying code upto ex13.rb