Added --threshold parameter
Fixed variable naming (old habits die hard)