added sigmaG threshold to subtract background