add code after designing, fix typo on class diagram