refactoring
refactoring, fixed manacurve bug