better status code handling
better status code handling