sorting not necessary as the app is currently using min_by instead of bsearch