Update dynamic query and new UI (will be continued)