changed a 'defined' to an 'exists'