polished according to the suggestion given by jwl