check if class already exists before defining