added VERY important local var check