fixed threshold completely, works perfectly.