added better status codes