First version of the script, tested in two machines
First version