correcting GrEA (unit-test passed)