use master-slave structure,change the repository to master-slave branch
refine some code