added inital version of fourier-series for square signal