added class6 code