refactoring step 4 to use dynamic routes