solution to issue #2.