redirect code repeated