update both examples to use the router