Changing the .each call to a more concise form