replaced loops in EntityManager::draw with range-based for loops