first standalone version of the script