Playing around with peak detection; Works OK for simple example ...