inserting a redirect callback