ruby script modified.