finish the function body serialization