serialize can be a function (not a method)