changed rename logic