added ratings_story_ID to SQL queries