moving peak picking into separate header