Moved client and db outside of method and modified story_exists to return a boolean value