threshold debugging