add analog threshold