added parameters to query method