These are my codes when learning ldd3.