added toNative support