Code optimization for run time. TO BE COMPLETED. DOES NOT COMPILEgit status