Better way of handling Num typeclass.