stl extensions refactoring