Correct duplicate code