more work on the story engine