First beta version of script