add max_dist2_between_boxes method
document changes