chessboard function now has it's own thread