try using arrays or stl