refactor,some updates