added gui switch in run script