stories functions out of stories.js