added threshold functions