Updated code for STL functions to be used in VS