query improvements, maybe