Improved, but still UNTESTED.