thorough ruby script