refacotred test