made data and dataUrl optional