small refactoring on method access and input testing