MinMaxTree is working