ensure class is defined