improvements to script (developing)