refactor extends relationship