revised the client script