why have a function that returns a class definition? this feels weird