CE-278 Optimizing solution