removing grammar::contains in favor of std::find