refactoring chain