changed installed state determination to lookup in a dictionary