got the program to recognize both black and white squares