added n argument to find_peaks