added several tests and made a fix highlighted by one such tests: a=wave+wave+wave