added basic tree stuff
and updated the input functions