more data structure exercise