fixed errors nad added checkmate from master