updated invokeObject to pass params instead of array