Updated for query