Small refactor for reusability