checking for mate now works