added replicaserver, but needs some tweeking to work on different machines