changed some of the version detection based on pull request feedback