Fix code to make pass the UnitTest