revise script by use variables and keywords