add create function to dom