Remove unnecessary each loop