added rule checking for king