first version of the encephalogram code