Bug fixed, and coding completed