cmp optimization, try 1 (crashing)