Refactor at the end