simplified code

list comprehensions are fun.