Pull request for issue #7 and #8