version 4

Code's structure has done
most code will not be changed
tidy the code