added comments. changed > threshold to >= threshold