Refactor to return status code.