removed duplicate and added class variable