Completed filterStories function