Use filter instead of for