need to add a 'dom' flag for the script