code tuning and optimization homework