Use replicateM to repeat action