Update Tree logic for adding data