add check and checkmate, fix dup method