error in varible scope