Implemented basic filtering.