it is not memory efficient, why create list for only iterating over ?