adding a visitor for cloning nodes