Added filter and sorting together.