separated black and white cells; still exceeds time limit