working on replicateA