added function to check if board is broken