adding a function to the typeclass