add params to function for redirect