Improve enumerable logic