implemented query data download