add redirect functionality to router