maybe we should use a tree structure