refactor adding params to query string