be a bit smarter about version checking