implemented tree using list of children representation