add percentage test and refactor test class