filtering and sorting is a nightmare