compile and run script