Add new function with list comprehension for assignment1