add tests for Ed and Egrad