add square wave generation snippets