simple electron class and tree defined.