review comments fixed and fixed unit tests