Modified MsWave for the process of finding threshold