changed the way routes are handled