Added option to pass query parameters