refactor for qsuery string params