refactroing tests