implemented issue #140