refactor for more complete test