refactor the designed and code

refactor the designed and code