refactored replicas to be used as a constructor parameter dependency, because of initialization problems with lazy val in named replica, etc.