Replaced sequence $ map with mapM