refactoring, ideoms upgrade2