adding changes back to allow for filtered queries