ReferenceError: status is not defined