Added thresholding of node weights