refactor for dynamic routes