n_array and sinusoid func added