Refactor working