Fixed Filter Functionality

still has bugs