old code with compile and run script