implemented issue #29