build the function to get the latest version number