major Refactor for Reusability