implement invoke method