moved results around, plotting by query code