work on issue #79 (not finished)