fixed issue #2
updated with upstream