added code for form to accept different params to query