refactoring & add little features
modify test case to export data
fix bug