First version of script finished