refactory to mvn project.
TODO:need test