square waves, work in progress