added class variable solution