Added ability to query based on params.