add typeclass to implement sub type