modifiy wing motion fourier series to fill arrays only once and deallocate them at the end