trim the bst between min and max value