optimizing ex_5_3