fixes #42: isolate the logic about semver