rewrote routes for better practice