convert class variable to local