Changed the arguments of the period() function to 2 arrays and 1 optional harmonic int