why not make this a list comprehension instead?