change of first script to use a variable