1. delete the reg
2. fix the bug in the diagram