Suggestion for issue #1

This provides a solution for the serialization request in issue #1