first attempt to complete issue #2