Add serialize-with-functions
wip