want to refactor how to call the methods and test