added setName function's code