Use class method in command classes