put loading gif after the script