tree implementation continued