refactoring getStoryId