change redirect code