reads threshold from user