fix if statement for checking of request
add version check to api