fixed isWhite definition