solving issue #4