refactor intercom