Changed a for loop to a one-line command, as per Eric's suggestion.