added the function choose API version