solution for issue #1