edited redirect callback