some clean up and tested with simple add, traverse