A modification of the “total peak area” (TPA) method for gamma ray spectra