made traversal functions part of Tree class... had to refactor.