updated the structure and where routes are defined