refactor assoication_chain