blog api refactored