common function made for firstname and lastname