better E logic