this pull request fixes #7 and #10 issues