first checks for move legality