fixed issue #10
implemented suggestion #5