Recreating LINQ for practice