Minor refactorin, extracted a method