getNumberOfWaves method added.