refactoring, new method setDataUrl