Take a look at the following script: