added second and third lines of code to get name and read name variable