changed how tf is calculated (divide by max weight); added SortUtil to sort maps according to value