optimization and more filters and sorting