using std::find instead of manual iteration