move getParams out to helpers