Added status code and conditionals