refactor parse relationship