use class << self rather than self.