solve it using STL, goood