added functionality to skip through trees