preparing more test and refactor [ci skip]