ruby 1.9 does not have String.grep, so i removed it here