v10 ex2. refactoring code. 2 methods, @name