Duplicate code removed