add check for response status code in request