revise a016 to check row and col digits