fixing most of unit test