variation of pull request #199 closing issue #196