adding classes in place of structs