merged from krautmann's pull request