merged version with stuff I added last time with Jocelyn and Boyd's version which allows users to add trees