check & mate working