implementing addition of replicates