works for 5x5 grid too