implemented filters and sorting