#41 merged pull request from @cryptogopher into develop branch, with modifications as noted on the pull request