The auxiliary function method for waveform based earthquake location