corrections in the ruby script