custom define shape typeclass