Implemented the filter functions

Not the final