CReateRun Function optimization