added class 3 code