the serialization fully works. added a nice debug flow in main().