refactor for brevity