refactor of relation type local rep