typeclassing a bit