stop overwriting global variable 'status'