using no stl vector, string, stack