list comprehension replaced with 'filter' and 'range'