Use each instead of explicit loop