Removed unnecessary enumerate func