created filters function for recent posts