Changed how the script is called to follow good practice rules