changed 'tricks' to 'behavior' & extended conditions