peak_detector done and add more tests