addressed issue #20
implemented issue #22