improve peak detection with better conditions