changed name variable to function