modified script, xhr fallback