simplifying refactor