almost finish the blog function