added loop to make sure input is given for name