introducing sorted trees