revise beforescript