rewrote this, as suggested above ==> d3caae7