refactor test part