refactor out 1 method