add paramters and query