removed grep since ruby 1.9 lacks String.grep