issue #5 code revision