added square wave with 2 frequencies