backporting changes from my blog