add redirect callback