version checking function