Weighing black holes in the universe