now passing the given object to the native code