refactored blog demo