Add replicateM and spec