Is there a simple way to do this without looping the list?