refactored the ap-date into a filter