document script order