moved cut eeg to separate function