used a for loop to log out names