changes as dicussed in pull request #8