simple refactor to make method more readable