changed board to local variable