Add threshold mode support