updated to use the correct set of response codes