the check on ``class`` looks useless here. I will never be defined as you don't define it previously