still working out logic bugs but can build the heirarchy