Added method to replace old setName method.