added generatePotentialChildren function to manange the creation of null objects when an item is added to the tree