got database querying from parameters working