duplication server code