Refactoring Step#4 to use dynamic routes