fix the blog script to enable it to be called anywhere