solved issue #3, issue #2