small refactor, abstracted out a method