refactoring
optimize