add check for http response status