Re-implementing E
Changes to E, need to test