What should we do if valid peaks is empty?
see the proposed solution in lines 131--133.
the reason I added the condition is that the case arises but I can't remember when
see the proposed solution in lines 131--133.
the reason I added the condition is that the case arises but I can't remember when