a simple implementation of STL