some simple functions to eeg analysis