stl unique funtion solution