Refactor for reuse