Added memory to sorting/filtering (HW 2.3)