2nd_refactor