modified toString in typeclass