pass crossOrigin to the function call