updated LocalVariable + optimzation