simplified name function

trying to figure out the name extraction