Use filter instead of map in these cases.