Now that you're writing a class method, you should not use instance variables, as there is no instance to share state with. Infact you're now setting class variables which is bad.

Just use local variables unless you know you need to share values between methods.