duplicate code fix