using list comprehension in checker