some postprocessing of pull request #7 by Mike