replicate base cases
completed replicate