Use STL algorithms