refactor blog model