重构
refactored a lot