added automatic name function