started on trees
updated arrays