basic support for typeclasses, still draft