peak detection tested and verified