merge newest code which can solve test failures