udpated variable scope