rely on typeclass for encode/decode, removing need for setting funs in record