updated script after testing