Added name variable and validation