added checkmate check without tests