added check code into board move