tests refactored using list comprehensions