EG: refactored and add lots of unittests