add a function to check version