Backend of checkmate