use foldM_ instead of foldM + void