implemented issue #141