rrt from hw3, for reference