refactor test to use multiple methods