modify getLocalName method