Deleted imperative implementation of intro assignement, and used filter method directly on list instead