refactoring test by adding tvi and tvo