refactored the story post ajax calls