Update to minimize queries