final and refactor