So i want to use the name variable in the code but it says no such variable when i try to return it from func, could anyone correct the code in a way it returns data i need