implemented rmtree to remove nodes that are empty... -sai