change class method to instance method