I have added more comments at the beginning of the script so that it is easier to understand the purpose of the script