Extracted the status variable s out of the if branch