merged grethen's pull request