added script to segment out peaks