(refactor) Updated for rearrangement