serialize addy function, fixes #2