stabilising the script to version 1.0