Creating second, (hopefully) more stable version of the script