Second post, replicate function changed (ATuin version).