fix && refactoring