better approach to working with redirect class