added in new functions for saw and square waves