added PUT & DELETE type + fixed potential bugs with error codes < 400