refactor mirroring configuration