refactored code and added fixture to auto create a blog post