reduced two thresholding methods to one, added plotting functions, added summary function, fixed bugs