Code adapted for 8x8