clean up, split out queries